<template>
  <div>
    <el-table :data="tableData" border size="medium" style="width: 100%">
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left" inline class="demo-table-expand">
            <el-form-item label="会议名称">
              <span>{{ props.row.Name }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column label="会议名称" prop="Name" align="center" />
      <el-table-column label="会议类型" prop="RelatedInformation" align="center" />
      <el-table-column label="会议议题" prop="Discussion" align="center" />
      <el-table-column label="会议时间" prop="TimeUnit" align="center" />
    </el-table>
  </div>
</template>

<script>
import { meetingList } from '@/api/projectInformation'
export default {
  props: {
    projectId: {
      type: String,
      default: () => {}
    }
  },
  data() {
    return {
      tableData: []
    }
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {
    this.getMeetingList()
  },
  methods: {
    getMeetingList() {
      const data = {
        meeting_type: 'demand',
        relation_id: this.projectId
      }
      meetingList(data).then(res => {
        if (res.code === 200) {
          console.log(res.data)
          this.tableData = res.data.data
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
/* @import url(); 引入css类 */
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
</style>
